<!--cart-list-con1
 * @Author: your name
 * @Date: 2022-03-11 22:57:47
 * @LastEditTime: 2022-03-29 09:42:59
 * @LastEditors: Please set LastEditors
 * @FilePath: \VUE\app\src\pages\Home\index.vue
-->
<template>
  <div>
    <typeNav />
    <listContainer />
    <todayRecommend />
    <rank />
    <like />
    <floor v-for="(floor) in floorList" :key="floor.id" :list="floor" />
    <brand />
  </div>
</template>
<script>
//引入首页组件
import listContainer from "@/pages/Home/ListContainer";
import todayRecommend from "@/pages/Home/TodayRecommend";
import rank from "@/pages/Home/Rank";
import like from "@/pages/Home/Like";
import floor from "@/pages/Home/Floor";
import brand from "@/pages/Home/Brand";

import { mapState } from "vuex";

export default {
  data() {
    return {};
  },
  components: {
    listContainer,
    todayRecommend,
    rank,
    like,
    floor,
    brand,
  },
  mounted() {
    //派放action 获取floor组件数据
    this.$store.dispatch("getFloorList");
    this.$store.dispatch('userInfo')
  },
  computed: {
    ...mapState({
      floorList: (state) => state.home.floorList,
    }),
  },

  
};
</script>
<style lang="less" scoped>
</style>
